package com.swg.myspring.service;

import com.swg.myspring.annotation.SwgResource;
import com.swg.myspring.dao.PersonDao;
import lombok.Data;

@Data
public class PersonServiceImpl2 implements PersonService2{

    private PersonDao personDao;
    private Integer age;

    @SwgResource(name = "personDao")
    public void setPersonDao(PersonDao personDao) {
        this.personDao = personDao;
    }

    @Override
    public void sayHello(){
        System.out.println("age:"+age);
        System.out.println("service中的sayHello方法调用成功");
        personDao.dbSayHello();
    }
}
